package com.allwees.bs.core.modelbase.validate;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * 校验数据项的定义，包括错误信息
 *
 * @author yangylsky
 */
@Data
@AllArgsConstructor
public class ValidateItem {
	private boolean error;

	private String errorMsg;

	public static ValidateItem of(boolean error, String errorMsg) {
		return new ValidateItem(error, errorMsg);
	}

	public static ValidateItem[] ofArray(boolean error, String errorMsg) {
		return new ValidateItem[] {of(error, errorMsg)};
	}
}
